package com.health.platform.provider.womenandchildhealth.controller;

import com.health.platform.common.core.entity.CommonQueryEntity;
import com.health.platform.common.restful.AppResponse;
import com.health.platform.provider.womenandchildhealth.service.WomenAndChildHealthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 公卫服务-妇幼保健（地方）Controller
 *
 * @author shi_xy_sr@neusiri.com
 * @date 2021/3/1 20:47
 */
@RestController
@RequestMapping("womenAndChildHealth")
public class WomenAndChildHealthController {
    @Autowired
    private WomenAndChildHealthService womenAndChildHealthService;
    /**
     * 获取中间部分汇总信息 (活产数、孕产妇建档数、儿童管理数、活产性别、健康管理、高危情况)
     * 
     * @param
     * @return 结果
     * @author shi_xy_sr@neusiri.com
     * @date 2021/3/2 8:48
     */
    @RequestMapping("/getSummaryInfo")
    public AppResponse getSummaryInfo(@RequestBody CommonQueryEntity commonQueryEntity){
        return womenAndChildHealthService.getSummaryInfo(commonQueryEntity);
    }
    /**
     * 获取根据地区分组的echarts图表数据(早孕建册率，新生儿访视率)
     *
     * @param
     * @return 结果
     * @author shi_xy_sr@neusiri.com
     * @date 2021/3/3 9:51
     */
    @RequestMapping("/getEchartsInfoByArea")
    public AppResponse getEchartsInfoByArea(@RequestBody CommonQueryEntity commonQueryEntity){
        return womenAndChildHealthService.getEchartsInfoByArea(commonQueryEntity);
    }
    /**
     * 根据近五年获取echarts图表数据（活产胎次、五岁以下儿童死亡率、产前筛查情况、孕产妇死亡率）
     *
     * @param
     * @return 结果
     * @author shi_xy_sr@neusiri.com
     * @date 2021/3/4 13:14
     */
    @RequestMapping("/getEchartsInfoByYear")
    public AppResponse getEchartsInfoByYear(@RequestBody CommonQueryEntity commonQueryEntity){
        return womenAndChildHealthService.getEchartsInfoByYear(commonQueryEntity);
    }
}
